﻿using NHibernate.Mapping.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IceZero.DataStore.Models
{
    /// <summary>
    /// 动作组合使用记录，用于返回诸如是否点赞的信息
    /// </summary>
    [Class(Table = "IceZero_OperationActionComboUsed")]
    public class OperationActionComboUsed : ModelBase
    {
        public OperationActionComboUsed() : base(genIdAuto: true)
        {

        }
        /// <summary>
        /// 动作组id
        /// </summary>
        [Property(Column = "ActionComboId", TypeType = typeof(string), Length = 200)]
        public virtual string ActionComboId { get; set; }
        /// <summary>
        /// 目标 id
        /// </summary>
        [Property(Column = "TargetId", TypeType = typeof(string), Length = 200)]
        public virtual string TargetId { get; set; }

        /// <summary>
        /// 目标类型
        /// </summary>
        [Property(Column = "TargetType", TypeType = typeof(string), Length = 200)]
        public virtual string TargetType { get; set; }

        /// <summary>
        /// 目标所属人 id
        /// </summary>
        [Property(Column = "TargetOwnerId", TypeType = typeof(string), Length = 200)]
        public virtual string TargetOwnerId { get; set; } = "unknown";

        /// <summary>
        /// 用于判断当前行为是否是正向的，如点赞行为，已经点赞了，还执行点赞，则提示已点赞
        /// </summary>
        [Property(Column = "IsPositive", TypeType = typeof(bool), NotNull = true)]
        public virtual bool IsPositive { get; set; } = true;
    }
}
